using System;
using System.Runtime.Serialization;
namespace Net35.Xrm.Sdk
{
	[DataContract(Name = "Label", Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts")]
	public sealed class Label : IExtensibleDataObject
	{
		private LocalizedLabelCollection _locLabels;
		private LocalizedLabel _userLocLabel;
		private ExtensionDataObject _extensionDataObject;
		[DataMember]
		public LocalizedLabelCollection LocalizedLabels
		{
			get
			{
				if (this._locLabels == null)
				{
					this._locLabels = new LocalizedLabelCollection();
				}
				return this._locLabels;
			}
			private set
			{
				this._locLabels = value;
			}
		}
		[DataMember]
		public LocalizedLabel UserLocalizedLabel
		{
			get
			{
				return this._userLocLabel;
			}
			set
			{
				this._userLocLabel = value;
			}
		}
		public ExtensionDataObject ExtensionData
		{
			get
			{
				return this._extensionDataObject;
			}
			set
			{
				this._extensionDataObject = value;
			}
		}
		public Label()
		{
		}
		public Label(string label, int languageCode)
		{
			this._locLabels = new LocalizedLabelCollection();
			this._locLabels.Add(new LocalizedLabel(label, languageCode));
		}
		public Label(LocalizedLabel userLocalizedLabel, LocalizedLabel[] labels)
		{
			this._userLocLabel = userLocalizedLabel;
			if (labels != null)
			{
				this._locLabels = new LocalizedLabelCollection(labels);
			}
		}
	}
}
